import { Component, OnInit, Inject } from '@angular/core';
import { _HttpClient } from '@delon/theme';
import { UtilityService} from '../../../../../../service/utils.service';
import {appConfig} from '../../../../../../service/common';
import {NzModalService, NzNotificationService} from 'ng-zorro-antd';
import {Router} from '@angular/router';
import { DA_SERVICE_TOKEN, ITokenService } from '@delon/auth';
import { ActivatedRoute} from '@angular/router';
import { WorkitemModule } from '../../../../../../service/delivent/workItemModule';
import { BranchModule} from '../../../../../../service/delivent/brachModule';
import * as _ from 'lodash';
import * as moment from 'moment';

@Component({
  selector: 'app-workdetail',
  templateUrl: './workdetail.component.html',
   styleUrls: ['./workdetail.component.less']
})
export class WorkdetailComponent implements OnInit {

    constructor(
        private http: _HttpClient,
        private router: Router,
        private utilityService: UtilityService,
        private modal: NzModalService,
        private nznot: NzNotificationService,
        public activatedRoute: ActivatedRoute,
        @Inject(DA_SERVICE_TOKEN) private tokenService: ITokenService,
 
    ) { }

    workGuid: string; // 工作项guid
    data: any; // 工作项日期

    ngOnInit() {
        this.workGuid = this.activatedRoute.snapshot.params.id; // 拿到父组件传过来的操作员的guid来进行操作
        this.getData();
    }

    getData() {
       this.data = [
           {
               'dataName': '新增工作项',
               'guidOperate': '1022004971090046977' ,
               'operateType': '新增',
               'userName': '李俊华',
               'items': '2018-08-11 13:50',
               'color': 'green'
           },
           {
               'dataName': '绑定分支',
               'guidOperate': '1022004971090046977' ,
               'operateType': '绑定分支',
               'userName': '李俊华',
               'items': '2018-08-11 13:50',
               'color': 'green'
           },
           {
               'dataName': '拉取工程',
               'guidOperate': '1022004971090046977' ,
               'operateType': '拉取',
               'userName': '李俊华',
               'items': '2018-08-11 13:50',
           },
           {
               'dataName': '投放工作项清单',
               'guidOperate': '1022004971090046977' ,
               'operateType': '投放',
               'userName': '李俊华',
               'items': '2018-08-11 13:50',
               'color': 'green'
           },
           {
               'dataName': '删除工作项',
               'guidOperate': '1022004971090046977' ,
               'operateType': '删除',
               'userName': '李俊华',
               'items': '2018-08-11 13:50',
               'color': 'red'
           }
       ]
    }
    getDetail(it){
        console.log
    }
}
